<template>
  <div id="app">
    <img src="./assets/logo.png">
    <!-- 父传子 -->
    <Users :users="users" @clickzf="clickzf"></Users>
    <!-- 子传父 -->
    <div>{{title}}</div>
    
    <router-view/>
  </div>
</template>

<script>
import Users from './components/Users.vue';
export default {
  components: {
    Users,
  },
  name: 'App',
  data() {
    return {
      users: ["blue","yellow","pink"],
      title:"hi welcome to my world"
    }
  },
  methods: {
    clickzf(v) {
      this.title=v
    }
  },
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
